export const VALID = 'VALID';
export const INVALID = 'INVALID';
export const PENDING = 'PENDING';
export const DISABLED = 'DISABLED';

export class Control {
  constructor() {
    this.status = '';
    this.pristine = true;
    this.touched = false;
  }

  get valid() { return this.status === VALID; }

  get invalid() { return this.status === INVALID; }

  get pending() { return this.status == PENDING; }

  get disabled() { return this.status === DISABLED; }

  get enabled() { return this.status !== DISABLED; }

  get dirty() { return !this.pristine; }

  get untouched() { return !this.touched; }

}